home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
delbut2.zip
/
DELBUT2.DOC
< prev
Wrap
Text File
|
1988-07-19
|
1KB
|
29 lines
DELBUT V 2.1 (minor fix) by J.E. Arkay 6/07/88
Deletes all but a given filespec in one directory. Useful for managing your
RAM disk.
*** TESTED, BUT NOT VERY MUCH *** *** TRY IT ON A SCRATCH DISK FIRST ***
Syntax: [d:][\path\]DELBUT2 [d:][\path\]filename.ext
It will not delete a Hidden or Read-Only file; it can delete itself.
Its use of wildcards is now just like DOS (which sucks, but won't surprise you):
DELBUT ?????.?? matches ABCDE.12 and ABCD.12 and ABC.1 but not ABCD.123
For example, on our AT clone with extended memory, we use a DOS shell that runs
faster from a RAM disk. When we start AutoCAD or copy a 1.2 Meg floppy, we use
DELBUT in a batch file to erase the RAM disk except for the DOS shell.
You can use it in a batch file where DEL *.* would give its 'Y/N' message and
require a keypress. Example to DEL D:\MY-DIR\*.*:
create a 1-byte file named X (DOS won't copy a zero-byte file)
COPY X D:\MY-DIR
DELBUT D:\MY-DIR\X
It returns Errorlevel=1 if nothing is deleted or an error occurs.
For instructions, TYPE or edit the .COM file or run it with no command line.